<template>
  <div @click="fuil" class="box"><img src="@/assets/imgs/quanpin.png" class="img" width="25" title="全屏"></div> 
</template>

<script>
import screenfull from 'screenfull'
export default {
  methods: {
    //全屏方法
    fuil() {
      if (screenfull.isEnabled) {
        screenfull.toggle()
      } else {
        ElMessage.console.error('浏览器不支持全屏')
      }
    },
  }
}
</script>

<style lang="less" scoped>
.box{
    display: inline-block;
    .img{
        vertical-align: middle;
        cursor: pointer;
    }
}
</style>